<?php $this->action("index","more","header");?>
 
<script> 
    Do.add('swfupload', {path: '/style/js/lib/swfupload.js', type: 'js'});
    Do.add('swfupload-obj', {path: '/style/js/lib/swfupload.obj.js', type: 'js'});
    Do.add('swfupload-queue', {path: '/style/js/lib/swfupload.queue.js', type: 'js'});
    Do.add('photoprogress', {path: '/style/js/lib/photoprogress.js', type: 'js'});
    Do.add('upload-photo-css', {path: '/style/css/lib/upload-photo.css', type: 'css'});
    Do.add('photo-upload', {path: '/style/js/lib/photo_upload.js', type: 'js', requires: ['upload-photo-css']});
</script>         
        
        <div id="content">
            <div class="main">
      
                
  			<h1>上传照片</h1>

                
                
                
			                
                
                
<div class="mod">
  <div class="bd">









<div id="photos-upload">
    <form action="<?php echo $this->getUrl("index","mod","completephotos",array("siteid"=>$site_E->id, "modid"=>$mod_E->id));?>" method="get" id="upload">

        <input type="hidden" value="" id="uploadFiles" name="pid" />
        <div class="upload-list hidden">
            <div class="hd">
                <span class="name">照片</span>
                <span class="size">大小</span>
                <span class="delete">删除?</span>
            </div>

            <div class="bd">
                <fieldset class="flash" id="fsUploadProgress"></fieldset>
            </div>
        </div>
        <div id="divStatus"></div>
        <div id="upload-btn">
            <span id="btn_holder"></span>
        </div>
        <div class="upload-tips"></div>

        <div id="upload-status" class="hidden">
            <span class="num">共&nbsp;<b></b>&nbsp;张</span><span class="continue-wrapper">&nbsp;|&nbsp;<a href="#" class="continue">继续添加照片</a></span>
            <span class="total-size">总计：<b></b></span>
        </div>
        <div id="has-error" class="hidden">
            <b></b>张照片上传失败。&nbsp;<span class="nextstep hidden">&gt;&nbsp;<a href="#">继续下一步</a>？</span>

        </div>
        <div class="opt-btns hidden">
            <input type="button" id="upload-start" value="开始上传" class="btn-green" />
            <a id="btnCancel" href="#">取消上传</a>
        </div>
        <input id="complete" type="submit" class="hidden minisubmit" value="&gt;&nbsp;下一步,填写图片信息" />
    </form>
</div>
<script>
    Do('swfupload', 'swfupload-obj', 'swfupload-queue', 'photoprogress', 'photo-upload', function () {
        var settings = {
                debug: false,
                flash_url: '/pics/swfupload.new.swf',
                file_post_name: 'file',
                upload_url: '/addphotos/<?php echo $site_E->id;?>/<?php echo $mod_E->id;?>/',
                post_params: {
                PHPSESSID:'<?php echo $phpsessid;?>'
                },
                file_size_limit: '',
                file_types: '*.jpg; *.jpeg; *.gif; *.bmp; *.png',
                file_types_description: 'Picture Files',
                file_upload_limit: 20,
                file_queue_limit: 0,
                custom_settings: {
                    progressTarget: 'fsUploadProgress',
                    cancelButtonId: 'btnCancel',
                    startButtonId: 'btnStart'
                },
                button_placeholder_id: 'btn_holder',
                button_width: 98,
                button_height: 29,
                button_image_url: '/pics/upload-btns.png',

                file_queued_handler: fileQueued,
                file_queue_error_handler: fileQueueError,
                file_dialog_complete_handler: fileDialogComplete,
                upload_start_handler: uploadStart,
                upload_progress_handler: uploadProgress,
                upload_error_handler: uploadError,
                upload_success_handler: uploadSuccess,
                upload_complete_handler: uploadComplete,
                queue_complete_handler: queueComplete,

                inimum_flash_version: '9.0.28',
                swfupload_pre_load_handler: preload,
                swfupload_load_failed_handler: swfuploadLoadFailed
            },

            oUploadBtn = $('#upload-btn'),
            oUploadStatus = $('#upload-status'),
            oStartUpload = $('#upload-start'),
            oBtnCancel = $('#btnCancel'),
            oOptBtns = $('.opt-btns'),
            oUploadTips = $('.upload-tips'),
            TMPL_UPLOAD_TIPS = '提示：每次最多可以<b>批量上传</b>二十张照片，按着&nbsp;“{CMD}”&nbsp;键可以一次选择多张照片';
            swfup = new SWFUpload(settings);
            oUploadBtn.show();
            $('#uploadFiles').val('');

            // init tips
            oUploadTips.html(TMPL_UPLOAD_TIPS.replace('{CMD}', navigator.userAgent.search('Mac') !== -1 ? 'command' : 'ctrl'));

            // cancel queue
            oBtnCancel.click(function (e) {
                e.preventDefault();
                swfup.cancelQueue();
                oOptBtns.addClass('hidden');
                oUploadStatus.addClass('hidden');
                oUploadBtn.removeAttr('style');
                oStartUpload.val('开始上传').removeAttr('disabled');
                setTimeout(function () {
                    oUploadTips.removeClass('hidden');
                }, $.browser.msie ? 1200 : 800);
            });

        // start upload
        oStartUpload.click(function () {
            swfup.startUpload();
        });

        // continue upload
        oUploadStatus.find('.continue').click(function (e) {
            e.preventDefault();
            oUploadBtn.removeAttr('style');
            oUploadStatus.addClass('hidden');
        });

        $('.nextstep a').click(function (e) {
            e.preventDefault();
            $('#upload').submit();
        });
    });
</script>


  </div>

</div>


            </div>
            <div class="aside">
                
				<div class="mod" id="sp-user">
				    <div class="bd">
				
				    </div>
				</div>
        
       		 </div>
</div>
 <?php $this->partial("/Tpl/Index/MoreAction/doFooter.htm");?>     
</body>
</html>